-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc: Correctly handle long crate names on mobile #120526
Conversation
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @jsha |
Don’t overly-long type names make it “…” truncate? If so, crates should probably do the same thing.
|
I don't think the use case is the same in both cases: you can't click on the crate name on mobile, so being able to scroll to see it full is a better approach (imo). |
Let’s fix that, and make it truncate, instead? I really don’t like the idea of doing vertical scrolling in such a tiny viewport. It’s only usable with a wheel. I hit the top edge of the screen if I touchscreen-scroll, and the scroll bar is too small and sensitive at this size. |
Fine by me. 👍 |
Just one question though: should we make it apparent that this is a link by using the usual link color or not? |
Oh wait, it's already a link if we're not at the top. So just keeping things as is. |
242add7
to
de6163f
Compare
…me are handled as expected on mobile
de6163f
to
5d29f5a
Compare
The crate name is now a link (for coherency with the other pages) and I updated how the text ellipsis is applied to make it work in case you have text in both |
@bors r+ rollup |
Rollup of 7 pull requests Successful merges: - rust-lang#120526 (rustdoc: Correctly handle long crate names on mobile) - rust-lang#121100 (Detect when method call on argument could be removed to fulfill failed trait bound) - rust-lang#121160 (rustdoc: fix and refactor HTML rendering a bit) - rust-lang#121198 (Add more checks for `unnamed_fields` during HIR analysis) - rust-lang#121218 (Fix missing trait impls for type in rustc docs) - rust-lang#121221 (AstConv: Refactor lowering of associated item bindings a bit) - rust-lang#121237 (Use better heuristic for printing Cargo specific diagnostics) r? `@ghost` `@rustbot` modify labels: rollup
…ame, r=notriddle rustdoc: Correctly handle long crate names on mobile Fixes rust-lang#120471. It now renders like this: ![image](https://github.com/rust-lang/rust/assets/3050060/065b4b8b-ba55-4163-a928-8d7bf735c111) r? ``@notriddle``
Rollup merge of rust-lang#120526 - GuillaumeGomez:mobile-long-crate-name, r=notriddle rustdoc: Correctly handle long crate names on mobile Fixes rust-lang#120471. It now renders like this: ![image](https://github.com/rust-lang/rust/assets/3050060/065b4b8b-ba55-4163-a928-8d7bf735c111) r? `@notriddle`
Fixes #120471.
It now renders like this:
r? @notriddle